# -*- coding: utf-8 -*-

incoming_order_tmpl = {
  "Template": "incoming_order.fr3",
  "Printer": "",
  "Tables": [
    {
      "Name": "Table1",
      "Cols": [
        {
          "type": "str",
          "size": 25,
          "Name": "order_name",
          "required": False
        },
        {
          "type": "str",
          "size": 25,
          "Name": "partner",
          "required": False
        },
        {
          "type": "str",
          "size": 25,
          "Name": "confirm_date",
          "required": False
        },
        {
          "type": "str",
          "size": 25,
          "Name": "user",
          "required": False
        }
      ],
      "Data": [
      ]
    },
    {
      "Name": "Table2",
      "Cols": [
        {"type": "str", "size": 25, "Name": "buliao_type", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_color", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_qty", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_weight", "required": False},
        {"type": "str", "size": 75, "Name": "line_names", "required": False},
        {"type": "str", "size": 75, "Name": "buliao_note", "required": False},
        {"type": "str", "size": 25, "Name": "customer_origin", "required": False}
      ],
      "Data": []
    },
    {
      "Name": "Table3",
      "Cols": [
        {
          "type": "str",
          "size": 25,
          "Name": "user",
          "required": False
        }
      ],
      "Data": []
    }
  ]
}

plan_order = {
  "Template": "plan_order.fr3",
  "Printer": "",
  "Tables": [
    {
      "Name": "Table1",
      "Cols": [
        {"type": "str", "size": 25, "Name": "plan_name", "required": False},
        {"type": "str", "size": 25, "Name": "partner", "required": False},
        {"type": "str", "size": 25, "Name": "plan_date", "required": False}
      ],
      "Data": [
        {"plan_name": "生产计划单/0001", "partner": "测试客户", "plan_date": "2018-03-11 12:02:11"}
      ]
    },
    {
      "Name": "Table2",
      "Cols": [
        {"type": "str", "size": 25, "Name": "so_name", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_type", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_color", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_qty", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_weight", "required": False},
        {"type": "str", "size": 75, "Name": "line_names", "required": False},
        {"type": "str", "size": 75, "Name": "buliao_note", "required": False}
      ],
      "Data": []
    },
    {
      "Name": "Table3",
      "Cols": [
        {
          "type": "str",
          "size": 25,
          "Name": "user",
          "required": False
        },
        {
          "type": "str",
          "size": 75,
          "Name": "note",
          "required": False
        }
      ],
      "Data": [{"user": "林志强", "note": "备注备注备注备注备注备注备注备注备注备注备注备注"}]
    }
  ]
}

outgoing_order = {
  "Template": "outgoing_order.fr3",
  "Printer": "",
  "Tables": [
    {
      "Name": "Table1",
      "Cols": [
        {"type": "str", "size": 25, "Name": "outgoing_name", "required": False},
        {"type": "str", "size": 25, "Name": "partner", "required": False},
        {"type": "str", "size": 25, "Name": "outgoing_date", "required": False},
        {"type": "str", "size": 25, "Name": "compute_method", "required": False}
      ],
      "Data": [
        {
          "outgoing_name": "出库单/0001", "partner": "测试客户",
          "outgoing_date": "2018-03-21 12:00:12", "compute_method": "按毛重"
        }
      ]
    },
    {
      "Name": "Table2",
      "Cols": [
        {"type": "str", "size": 25, "Name": "customer_origin", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_type", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_qty", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_net_weight", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_weight", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_unit_price", "required": False},
        {"type": "str", "size": 25, "Name": "amount_total", "required": False}
      ],
      "Data": [
        {
          "customer_origin": "BAS00873",
          "buliao_type": "测试品",
          "buliao_qty": "10",
          "buliao_net_weight": "142.1",
          "buliao_weight": "150.22",
          "buliao_unit_price": "13.2",
          "amount_total": "132"
        }
      ]
    },
    {
      "Name": "Table3",
      "Cols": [
        {"type": "str", "size": 25, "Name": "user", "required": False},
        {"type": "str", "size": 25, "Name": "amount_total", "required": False},
        {"type": "str", "size": 25, "Name": "credit", "required": False}
      ],
      "Data": [
        {"user": "林志强", "amount_total": "132", "credit": "120"}
      ]
    }
  ]
}

outgoing_order_detail = {
  "Template": "outgoing_order_detail.fr3",
  "Printer": "",
  "Tables": [
    {
      "Name": "Table1",
      "Cols": [
        {"type": "str", "size": 25, "Name": "buliao_note", "required": False},
        {"type": "str", "size": 25, "Name": "partner", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_type", "required": False},
        {"type": "str", "size": 25, "Name": "customer_origin", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_width", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_g_weight", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_qty", "required": False},
        {"type": "str", "size": 25, "Name": "so_name", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_weight", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_net_weight", "required": False}
      ],
      "Data": [
        {
          "buliao_note": "备注",
          "partner": "客户A",
          "buliao_type": "测试品名",
          "customer_origin": "GNH9991",
          "buliao_width": 12.1,
          "buliao_g_weight": 13.1,
          "buliao_qty": 15,
          "so_name": "SO0012",
          "buliao_weight": 13,
          "buliao_net_weight": 12
        }
      ]
    },
    {
      "Name": "Table2",
      "Cols": [
        {"type": "str", "size": 25, "Name": "buliao_name", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_weight", "required": False}
      ],
      "Data": []
    }
  ]
}

buliao_tag = {
  "Template": "buliao_tag_heng.fr3",
  "Printer": "Gprinter GP-3100TU",
  "Tables": [
    {
      "Name": "Table1",
      "Cols": [
        {"type": "str", "size": 25, "Name": "partner", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_type", "required": False},
        {"type": "str", "size": 25, "Name": "customer_origin", "required": False},
        {"type": "str", "size": 25, "Name": "buliao_width", "required": False},
        {"type": "str", "size": 25, "Name": "weight", "required": False},
        {"type": "str", "size": 25, "Name": "number", "required": False},
        {"type": "str", "size": 25, "Name": "done_date", "required": False}
      ],
      "Data": [{
        "partner": "客户",
        "buliao_type": "品名",
        "customer_origin": "GBN11123",
        "buliao_width": "13.11",
        "weight": "12.11",
        "number": "2",
        "done_date": "2018-03-12 12:01:11"
      }]
    }
  ]
}
